<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>行为页面</title>
    <link rel="stylesheet" href="/static/style.css">
    <script src="{{ url_for('static', filename='script.js') }}" defer></script>
</head>
<body>
    <div class="sidebar">
        <ul>
            <li><a href="/main">主页</a></li>
            <li><a href="/query">查询</a></li>
            <li><a href="/realtime">实时数据</a></li>
            <li><a href="/logout" class="logout">登出</a></li>
        </ul>
    </div>
    <div class="content">
        <h1>输入指令</h1>
       
        <!-- 表单 -->
        <form action="/action" method="post">
            <label for="action_type">操作类型：</label>
            <input type="text" name="action_type" id="action_type" placeholder="请输入操作类型" required><br>

            <label for="content">操作内容：</label>
            <input type="number" step="0.01" name="content" id="content" placeholder="请输入具体操作内容" required><br>

            <label for="car_id">车辆 ID：</label>
            <input type="text" name="car_id" id="car_id" placeholder="请输入车辆 ID" required><br>

            <button type="submit">提交操作</button>
        </form>

        {% if result %}
        <h2>操作结果</h2>
        <p>{{ result }}</p>
        {% endif %}

        {% if error %}
        <h2>错误</h2>
        <p>{{ error }}</p>
        {% endif %}
    </div>
</body>
</html>
